Spatiotemporal context is crucial in modern mobile applications that utilizeincreasing amounts of context to better predict events and user behaviors,requiring rich records of users' or devices' spatiotemporal histories.Maintaining these rich histories requires frequent sampling and indexed storageof spatiotemporal data that pushes the limits of resource-constrained mobiledevices. Today's apps offload processing and storing contextual information,but this increases response time, often relies on the user's data connection,and runs the very real risk of revealing sensitive information. In this paperwe motivate the feasibility of on-loading large amounts of context andintroduce PACO (Programming Abstraction for Contextual On-loading), anarchitecture for on-loading data that optimizes for location and time whileallowing flexibility in storing additional context. The PACO API's innovationsenable on-loading very dense traces of information, even given devices'resource constraints. Using real-world traces and our implementation forAndroid, we demonstrate that PACO can support expressive application queriesentirely on-device. Our quantitative evaluation assesses PACO's energyconsumption, execution time, and spatiotemporal query accuracy. Further, PACOfacilitates unified contextual reasoning across multiple applications and alsosupports user-controlled release of contextual data to other devices or thecloud; we demonstrate these assets through a proof-of-concept case study.
展开▼